package com.wf.day_0619.test2;

/**
 * @Author fengqq
 * @Description TODO
 * @Date 2024/6/19  14:33
 */
@MyController(beanName = "teacher")
public class Teacher {
    @MyValue("3")
    private int workAge;
    @MyValue("软件工程")
    private String major;

    //会在IOC容器中寻找有没有合适的bean来作为 此属性的值
    //以p1作为key来匹配合适的person
    @MyAutowired(beanName = "p1")
    private Person person;

    public Teacher() {
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "workAge=" + workAge +
                ", major='" + major + '\'' +
                ", person=" + person +
                '}';
    }
}
